home *** CD-ROM | disk | FTP | other *** search
-
- /*
- There may be additional include files required depending
- upon the compile product you are using. Typical compilers
- include Microsoft C by Microsoft or Turbo C by Boland Int'l.
- */
- #include <stdio.h>
- #define NEWLINE '\n'
- #define NULL '\0'
- #define MAX 80
- #define ESC '\033'
- main()
- {
- char array[MAX];
- int i=0;
- do{
- array[i]=getchar();
- if(array[i]==ESC)
- printf("An escape has been entered\n");
- }while(array[i] != NEWLINE && i++ < MAX );
- array[--i]=NULL;
- }
-